﻿<?php
$bdd = new PDO('mysql:host=localhost;dbname=brin_de_soleil', 'root', '');

$reponse = $bdd->prepare('SELECT * FROM inscription NATURAL JOIN inscription_paiement,acompte,inscription_fraismedic,inscription_infomedic 
WHERE num_inscription = :numinscr OR date_creation = :datecreation OR participant = :participant OR num_compte_comptable = :numcompte 
OR sejour_demande1 = :sejourdemande OR date_option = :dateoption OR semaine1 = :semaine1 OR semaine2 = :semaine2 OR semaine3 = :semaine3 
OR date_debut = :datedebut OR lieu_depart_premier = :lieu OR num_vehicule_debut = :numvehicule OR nom_resp_debut = :nomresp OR verse_le1 = :versele
OR inscr_prise_par = :inscrpar OR fact_convention = :factconv OR argent_poche = :argentpoche OR depart_proj_av = :departprojav OR date_envoi = :dateenvoi 
OR type_soin = :typesoin OR annulation = :annul OR crobs_avent = :crobsavent OR reglement_ok = :reglementok OR bon_resa = :bonresa OR autonomie = :autonomie
OR cardio = :cardiopathie OR suicidaire = :suicidaire OR signature_auto = :signature OR suit_traitement_medic = :suit_traitement OR alcool = :alcool
OR sortie = :sortie OR soin = :soins_infirm OR baignade = :baignade OR fugue = :fugue OR prend_seul_traitement = :prend_seul_traitement
OR rester_seul = :rester_seul OR epilepsie = :epilepsie OR fiche_suivi = :fiche_suivi OR photo = :photos OR enuresie = :enuresie
OR contraception = :contraception OR num_urgence = :num_urgence OR encopresie = :encopresie OR medecin = :medecin OR hospitalisation = :hospitalisation
OR asthme = :asthme OR ordonnance = :ordonnance OR changement = :changement OR agressif = :agressif OR signature_fiche = :signature_fiche
OR couple = :couple OR conjoint = :conjoint');
$reponse->execute(array(
	'numinscr' => $_POST['numinscr'],
	'datecreation' => $_POST['datecreation'],
	'participant' => $_POST['participant'],
	'numcompte' => $_POST['numcompte'],
	'sejourdemande' => $_POST['sejourdemande'],
	'dateoption' => $_POST['dateoption'],
	'semaine1' => isset($_POST['semaine1'])?1:0,
	'semaine2' => isset($_POST['semaine2'])?1:0,
	'semaine3' => isset($_POST['semaine3'])?1:0,
	'datedebut' => $_POST['datedebut'],
	'lieu' => $_POST['lieu'],
	'numvehicule' => $_POST['numvehicule'],
	'nomresp' => $_POST['nomresp'],
	'versele' => $_POST['versele'],
	'inscrpar' => $_POST['inscrpar'],
	'factconv' => $_POST['factconv'],
	'argentpoche' => $_POST['argentpoche'],
	'departprojav' => $_POST['departprojav'],
	'dateenvoi' => $_POST['dateenvoi'],
	'typesoin' => $_POST['typesoin'],
	'annul' => $_POST['annul'],
	'crobsavent' => isset($_POST['crobsavent'])?1:0,
	'reglementok' => isset($_POST['reglementok'])?1:0,
	'bonresa' => isset($_POST['bonresa'])?1:0,
	'autonomie' => isset($_POST['autonomie'])?1:0,
	'cardiopathie' => isset($_POST['cardiopathie'])?1:0,
	'suicidaire' => isset($_POST['suicidaire'])?1:0,
	'signature' => isset($_POST['signature'])?1:0,
	'suit_traitement' => isset($_POST['suit_traitement'])?1:0,
	'alcool' => isset($_POST['alcool'])?1:0,
	'sortie' => isset($_POST['sortie'])?1:0,
	'soins_infirm' => isset($_POST['soins_infirm'])?1:0,
	'baignade' => isset($_POST['baignade'])?1:0,
	'fugue' => isset($_POST['fugue'])?1:0,
	'prend_seul_traitement' => isset($_POST['prend_seul_traitement'])?1:0,
	'rester_seul' => isset($_POST['rester_seul'])?1:0,
	'epilepsie' => isset($_POST['epilepsie'])?1:0,
	'fiche_suivi' => isset($_POST['fiche_suivi'])?1:0,
	'photos' => isset($_POST['photos'])?1:0,
	'enuresie' => isset($_POST['enuresie'])?1:0,
	'contraception' => isset($_POST['contraception'])?1:0,
	'num_urgence' => isset($_POST['num_urgence'])?1:0,
	'encopresie' => isset($_POST['encopresie'])?1:0,
	'medecin' => isset($_POST['medecin'])?1:0,
	'hospitalisation' => isset($_POST['hospitalisation'])?1:0,
	'asthme' => isset($_POST['asthme'])?1:0,
	'ordonnance' => isset($_POST['ordonnance'])?1:0,
	'changement' => isset($_POST['changement'])?1:0,
	'agressif' => isset($_POST['agressif'])?1:0,
	'signature_fiche' => isset($_POST['signature_fiche'])?1:0,
	'couple' => isset($_POST['couple'])?1:0,
	'conjoint' => $_POST['conjoint'],
	));

		echo"<table border= 1>";
		echo"<tr align= center>";
				echo"<td><b>Num. inscription</b></td>";
				echo"<td><b>Date création</b></td>";
				echo"<td><b>Participant</b></td>";
				echo"<td><b>Num. compte comptable</b></td>";
				echo"<td><b>Commentaire</b></td>";
				echo"<td><b>Séjour demande 1</b></td>";
				echo"<td><b>Date option</b></td>";
				echo"<td><b>Intitulé séjour 1</b></td>";
				echo"<td><b>Semaine 1</b></td>";
				echo"<td><b>Semaine 2</b></td>";
				echo"<td><b>Semaine 3</b></td>";
				echo"<td><b>Date debut</b></td>";
				echo"<td><b>Lieu depart premier</b></td>";
				echo"<td><b>Sur place début</b></td>";
				echo"<td><b>Num. véhicule début</b></td>";
				echo"<td><b>Présence resp début</b></td>";
				echo"<td><b>Nom resp début</b></td>";
				echo"<td><b>Tél resp début</b></td>";
				echo"<td><b>Médicaments début</b></td>";
				echo"<td><b>Date fin</b></td>";
				echo"<td><b>Lieu depart premier</b></td>";
				echo"<td><b>Sur place fin</b></td>";
				echo"<td><b>Num. véhicule</b></td>";
				echo"<td><b>Présence resp</b></td>";
				echo"<td><b>Nom resp</b></td>";
				echo"<td><b>Tél resp</b></td>";
				echo"<td><b>Médicaments</b></td>";
				echo"<td><b>Date départ</b></td>";
				echo"<td><b>Lieu départ</b></td>";
				echo"<td><b>Date retour</b></td>";
				echo"<td><b>Lieu retour</b></td>";
				echo"<td><b>Total séjour</b></td>";
				echo"<td><b>Facture groupe</b></td>";
				echo"<td><b>Cotisation</b></td>";
				echo"<td><b>Montant transport</b></td>";
				echo"<td><b>Assurance</b></td>";
				echo"<td><b>Remise</b></td>";
				echo"<td><b>Solde</b></td>";
				echo"<td><b>Solde à payer</b></td>";
				echo"<td><b>Acompte 1</b></td>";
				echo"<td><b>1 Versé le</b></td>";
				echo"<td><b>1 Mode réglement</b></td>";
				echo"<td><b>Acompte 2</b></td>";
				echo"<td><b>2 Versé le</b></td>";
				echo"<td><b>2 Mode réglement</b></td>";
				echo"<td><b>Acompte 3</b></td>";
				echo"<td><b>3 Versé le</b></td>";
				echo"<td><b>3 Mode réglement</b></td>";
				echo"<td><b>Acompte 4</b></td>";
				echo"<td><b>4 Versé le</b></td>";
				echo"<td><b>4 Mode réglement</b></td>";
				echo"<td><b>Bon resa</b></td>";
				echo"<td><b>Inscription par</b></td>";
				echo"<td><b>Facture conv.</b></td>";
				echo"<td><b>Argent poche</b></td>";
				echo"<td><b>Depart proj av.</b></td>";
				echo"<td><b>Montant</b></td>";
				echo"<td><b>Crobs avent.</b></td>";
				echo"<td><b>Date envoi</b></td>";
				echo"<td><b>Reglement ok</b></td>";
				echo"<td><b>Date regl.</b></td>";
				echo"<td><b>Mode regl. argent</b></td>";
				echo"<td><b>Dossier envoi</b></td>";
				echo"<td><b>Dossier recu</b></td>";
				echo"<td><b>Montant frais</b></td>";
				echo"<td><b>Date frais</b></td>";
				echo"<td><b>Dossier complet</b></td>";
				echo"<td><b>Reglement frais</b></td>";
				echo"<td><b>Date reglement frais</b></td>";
				echo"<td><b>Mode reglement frais</b></td>";
				echo"<td><b>Description</b></td>";
				echo"<td><b>Type soin</b></td>";
				echo"<td><b>Annulation</b></td>";
				echo"<td><b>Motif</b></td>";
				echo"<td><b>Autonomie</b></td>";
				echo"<td><b>Cardio</b></td>";
				echo"<td><b>Suicidaire</b></td>";
				echo"<td><b>Signature auto</b></td>";
				echo"<td><b>Suit traitement médical</b></td>";
				echo"<td><b>Alcool</b></td>";
				echo"<td><b>Sortie</b></td>";
				echo"<td><b>Soin</b></td>";
				echo"<td><b>Baignade</b></td>";
				echo"<td><b>Fugue</b></td>";
				echo"<td><b>Prend seul traitement</b></td>";
				echo"<td><b>Rester seul</b></td>";
				echo"<td><b>Epilepsie</b></td>";
				echo"<td><b>Fiche suivi</b></td>";
				echo"<td><b>Photo</b></td>";
				echo"<td><b>Enuresie</b></td>";
				echo"<td><b>Contraception</b></td>";
				echo"<td><b>Num urgence</b></td>";
				echo"<td><b>Encopresie</b></td>";
				echo"<td><b>Medecin</b></td>";
				echo"<td><b>Hospitalisation</b></td>";
				echo"<td><b>Asthme</b></td>";
				echo"<td><b>Ordonnance</b></td>";
				echo"<td><b>Changement</b></td>";
				echo"<td><b>Agressif</b></td>";
				echo"<td><b>Signature fiche</b></td>";
				echo"<td><b>Couple</b></td>";
				echo"<td><b>Conjoint</b></td>";
			echo"</tr>";
		while ($donnees = $reponse->fetch())
		{
			echo"<tr>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['num_inscription']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_creation']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['participant']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['num_compte_comptable']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['commentaire']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['sejour_demande1']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_option']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['intitule_sejour1']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['semaine1']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['semaine2']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['semaine3']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_debut']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['lieu_depart_premier']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['surplacedebut']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['num_vehicule_debut']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['presence_resp_debut']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['nom_resp_debut']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['tel_resp_debut']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['medic_transport_debut']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_fin']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['lieu_depart_second']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['surplacefin']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['num_vehicule_fin']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['pres_resp_fin']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['nom_resp_fin']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['tel_resp_fin']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['medic_fin']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_depart']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['lieu_depart']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_retour']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['lieu_retour']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['total_sejour']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['fact_groupe']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['cotisation']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['montant_transp']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['assurance']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['remise']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['solde']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['solde_payer']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['acompte1']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['verse_le1']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['mode_regl1']."'/></td>";	
				echo "<td><input style='text-align:center' type=text value='".$donnees['acompte2']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['verse_le2']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['mode_regl2']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['acompte3']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['verse_le3']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['mode_regl3']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['acompte4']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['verse_le4']."'/></td>";		
				echo "<td><input style='text-align:center' type=text value='".$donnees['mode_regl4']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['bon_resa']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['inscr_prise_par']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['fact_convention']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['argent_poche']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['depart_proj_av']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['montant']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['crobs_avent']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_envoi']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['reglement_ok']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_regl']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['mode_regl_argent']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['dossier_envoi']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['dossier_recu']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['montant_fraismedic']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_frais']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['dossier_complet']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['reglement_frais']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['date_regl_frais']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['mode_regl_frais']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['description']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['type_soin']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['annulation']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['motif']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['autonomie']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['cardio']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['suicidaire']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['signature_auto']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['suit_traitement_medic']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['alcool']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['sortie']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['soin']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['baignade']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['fugue']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['prend_seul_traitement']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['rester_seul']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['epilepsie']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['fiche_suivi']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['photo']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['enuresie']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['contraception']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['num_urgence']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['encopresie']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['medecin']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['hospitalisation']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['asthme']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['ordonnance']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['changement']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['agressif']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['signature_fiche']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['couple']."'/></td>";
				echo "<td><input style='text-align:center' type=text value='".$donnees['conjoint']."'/></td>";
			echo"</tr>";
		}
		echo"</table>";
?>